package com.example.rdb.conf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Version 1.0
 * @Author:徐衍程
 * @Date:2021/9/1
 * @Content:
 */
@Component
public class ConfigInfo {
    public static String  etcdRead;
    public static String  etcdWrite;
    public static String  tenantRead;
    public static String  tenantWrite;
    public static String  appRead;
    public static String  appWrite;
    public static String  wxApp;
    public static String  wxTenant;
    public static String  cmsId;

    @Value("${spring.etcd-read}")
    public void setetcdRead(String etcdRead) {
        ConfigInfo.etcdRead = etcdRead;
    }
    @Value("${spring.etcd-write}")
    public void setetcdWrite(String etcdWrite) {
        ConfigInfo.etcdWrite = etcdWrite;
    }
    @Value("${madp.tenant.read}")
    public void setTenantRead(String tenantRead) {
        ConfigInfo.tenantRead = tenantRead;
    }
    @Value("${madp.tenant.write}")
    public void setTenantWrite(String tenantWrite) {
        ConfigInfo.tenantWrite = tenantWrite;
    }
    @Value("${madp.app.read}")
    public void setAppRead(String appRead) {
        ConfigInfo.appRead = appRead;
    }
    @Value("${madp.app.write}")
    public void setAppWrite(String appWrite) {
        ConfigInfo.appWrite = appWrite;
    }
    @Value("${madp.wx.app}")
    public void setWxApp(String wxApp) {
        ConfigInfo.wxApp = wxApp;
    }
    @Value("${madp.wx.tenant}")
    public void setWxTenant(String wxTenant) {
        ConfigInfo.wxTenant = wxTenant;
    }
    @Value("${madp.cms.start-id}")
    public void setCmsId(String cmsId) {
        ConfigInfo.cmsId = cmsId;
    }
}
